package com.dingup.homework.feign.client.user;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by wancheng on 2018/7/5.
 */
@Component
@FeignClient(value = "p-innermgrweb") //这里的name对应调用服务的spring.applicatoin.name
public interface ClassFeignClient {

    /**
     * 添加作业获取班级信息
     *
     * @param teacherId
     * @return
     */
    @RequestMapping(value = "/feign/class_info/get_class_info_for_add_homework.do", method = RequestMethod.POST)
    public List<Map<String, Object>> getClassInfoForAddHomework(@RequestParam("teacherId") String teacherId);

    /**
     * 添加作业获取老师和学生信息
     *
     * @param classId
     * @return
     */
    @RequestMapping(value = "/feign/class_info/get_student_teacher_for_add_homework.do", method = RequestMethod.POST)
    public Map<String, Object> getStudentAndTeacherForAddHomework(@RequestParam("classId") Integer classId);


}
